// @ts-nocheck
import React from 'react'
import { GestureResponderEvent, Image, ImageSourcePropType, TouchableOpacity, View } from 'react-native';
import portrait_default from "@/assets/createTask/portrait_default.png"
import LazyImage from './LazyImage';
export default function IconButton(props: { size?: number, path: ImageSourcePropType | string, onPress: (event: GestureResponderEvent) => void }) {
    const { size = 16, path, onPress } = props
    return (
        <TouchableOpacity onPress={onPress}>
            {
                typeof path === 'number' ?
                    (<Image source={path} style={{ width: size, height: size }} />) :
                    (<LazyImage uri={path} style={{ width: size, height: size , borderRadius:8 }} />)
            }

        </TouchableOpacity>
    );
}
